<!--title-->
<div class="mnav1">
	<div class="m_nav">
		<div class="nav_left">
			<em class="home_icon"><?=$this->sys_name?></em><span>&nbsp;&gt;&nbsp;</span><font><?=$this->title?></font>
		</div>
	</div>
</div>

<div class="content-table">
    <form action="/maozhua/task-logs2" name="form1" method="GET" style="float: left">
        日期：<input type="text" name="date_start" id="date_start" autocomplete="off" style="width: 80px"> ~ <input type="text" name="date_end" id="date_end" autocomplete="off" style="width: 80px">
        &nbsp;&nbsp;
        关键字：<input type="text" style="width: 100px;" name="keyword" <?php if($this->keyword){echo "value='".$this->keyword."'";}?> />
        &nbsp;&nbsp;&nbsp;
        状态：<select name="status">
            <option value="">请选择</option>
            <option value="2" <?php if($this->status==2){echo "selected=selected";}?>>成功</option>
            <option value="1" <?php if($this->status==1){echo "selected=selected";}?>>失败</option>
        </select> 
        &nbsp;&nbsp;&nbsp;
        <input type="submit" class="button" value="搜 索" style="width:60px"/>
        &nbsp;&nbsp;&nbsp;
        <input type="button" class="button-cancle" style="width:100px" value="清空条件" onclick="location.href='?';" />
    </form>
<div class="content-table-title"><?=$this->title?></div>
<br />
<table>
  <tr>
    <th>ID</th>
    <th>状态</th>
    <th>备注1</th>
    <th>备注2</th>
    <th>用户名</th>
    <th>记录时间</th>
  </tr>

    <?php $data = $this->data['current_page_info'];?>

    <?php if($data["log_id"]):?>
        <?php foreach($data["log_id"] as $id => $something):?>
            <tr>
                <td><?=$data["log_id"][$id]?></td>
                <td><?=$data["status"][$id]?"<font color='green'>成功</font>":"<font color='red'>失败</font>"?></td>
                <td><?=$data["error_msg"][$id]?></td>
                <td><?=$data["remark"][$id]?></td>
                <td><?=$data["user_name"][$id]?></td>
                <td><?=$data["ctime"][$id]?></td>

            </tr>
        <?php endforeach;?>
    <?php endif;?>

</table>
    <br /><br />
    <div align="right"><?=$this->pagination?></div>
    <br /><br /><br />
<br /><br />

    <script>
        var date = new Date();//获取当前时间
        date.setDate(date.getDate()-1);

        $(function() {
            $( "#date_start" ).datepicker({ dateFormat: 'yy-mm-dd'}).datepicker("setDate", "<?=$this->date_start?>");
        });

        $(function() {
            $( "#date_end" ).datepicker({ dateFormat: 'yy-mm-dd'}).datepicker("setDate", "<?=$this->date_end?>");
        });
    </script>